package com.seele.tigerwallet.ui;

import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import com.seele.tigerwallet.R;
import com.seele.tigerwallet.ui.activtiy.CreateEthWalletActivity;
import com.seele.tigerwallet.ui.activtiy.ImportWalletActivity;
import com.seele.tigerwallet.ui.base.BaseActivity;
import com.umeng.analytics.MobclickAgent;

/**
 * 注册钱包页面
 */
public class RegisterActivity extends BaseActivity {

    private String TAG = RegisterActivity.this.getClass().getSimpleName();
    private Button mBtnOk;
    private Button mBtnCreateWallet;
    private Button mBtnImportWallet;
    private LinearLayout mLayoutTips;
    private LinearLayout mLayoutCreateWallet;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_register;
    }

    @Override
    protected void init() {
        iniView();
    }

    private void iniView() {
        mBtnOk = (Button) findViewById(R.id.btn_ok);
        mBtnCreateWallet = (Button) findViewById(R.id.btn_create_wallet);
        mBtnImportWallet = (Button) findViewById(R.id.btn_import_wallet);
        mLayoutTips = (LinearLayout) findViewById(R.id.layout_tips);
        mLayoutCreateWallet = (LinearLayout) findViewById(R.id.layout_wallet_create);
    }

    public void onBtnClick(View v) {
        switch (v.getId()) {
            case R.id.btn_ok: {
                mLayoutTips.setVisibility(View.GONE);
                mLayoutCreateWallet.setVisibility(View.VISIBLE);
            }
            break;
            case R.id.btn_create_wallet: { //创建钱包
                startActivity(CreateEthWalletActivity.class);
                finish();
            }
            break;
            case R.id.btn_import_wallet: { //导入钱包
                startActivity(ImportWalletActivity.class);
                finish();
            }
            break;
            default:
        }
    }

    @Override
    protected void onPause() {
        MobclickAgent.onPause(this);
        super.onPause();
    }



}
